/// <reference path="F:\Html5 Game\Game project\js\libs\kangax-fabric-48.306.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\DBAbstractionLayer.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\GameCanvas.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Node.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\NodeType.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Planet.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Region.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Scale.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\System.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Universe.js"/>
/// <reference path="F:\Html5 Game\Game project\js\classes\Utilities.js"/>
var Node = function (type, coordinate) {

    //Verwijzingen
    var obj = this;

    //Variabelen
    var type = type;
    var coordinate = coordinate;
    var image = new Image();

    //Constructor
    var _constructor = function () {
        if (type == NodeType.METAL) {
            image.src = "img/placeholder_node1.png";
        }
        else if (type == NodeType.ENERGY) {
            image.src = "img/placeholder_node2.png";
        }
        else {
            image.src = "img/placeholder_node3.png";
        }
    }


    //Public functies
    obj.draw = function (context, scale) {
        try {
            if (scale == Scale.PLANET) {
                context.drawImage(image, ((context.canvas.width/2)+coordinate.getX()), ((context.canvas.height/2)+coordinate.getY()));
            }
        }
        catch (e) {
        }
    }


    //Private Functies

    _constructor();
};